package com.syaccp.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@ApiModel(value = "WithdrawalRequest",description = "提现时传递过来的数据")
@Data
public class WithdrawalRequest {

    @ApiModelProperty(value = "提现金额")
    @NotNull
    @Min(value= 1 ,message= "提现金额最低为1元！" )
    private Double money;
    @ApiModelProperty(value = "提现的客户id")
    @NotNull
    private Integer customerId;
    @ApiModelProperty(value = "提现目标银行id")
    @NotNull
    private Integer bankId;

    @ApiModelProperty(value = "提现目标银行卡号码")
    @NotNull
    @Pattern(regexp = "^\\d{9,18}$",message = "银行卡号格式错误！")
    private String bankAccount;
    @ApiModelProperty(value = "开户人名称")
    @NotNull
    @Length(min = 2,message = "开户人姓名格式错误")
    private String accountName;

    @ApiModelProperty(value = "开户人手机号")
    @Length(min = 11, max = 11, message = "手机号只能为11位!")
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误!")
    private String accountPhone;
}
